package main

//
//import (
//	"github.com/Nik-U/pbc"
//	"github.com/consensys/gnark-crypto/ecc"
//	"github.com/consensys/gnark/frontend"
//	"github.com/consensys/gnark/std/hash/mimc"
//	"math/big"
//)
//
//type Circuit struct {
//	Mx        [][]frontend.Variable `gnark:",public"`
//	Cloud_HMx [][]frontend.Variable
//	//Cloud_SHMx [][]frontend.Variable `gnark:",public"`
//	//r          frontend.Variable     `gnark:",public"`
//}
//
//func (circuit *Circuit) Define(curve ecc.ID, api frontend.API) error {
//	// create the mc hash function
//	mc, _ := mimc.NewMiMC("seed", curve, api)
//	HMx := make([][]frontend.Variable, len(circuit.Mx))
//	for i := range HMx {
//		HMx[i] = make([]frontend.Variable, len(circuit.Mx[i]))
//	}
//	for i, row := range circuit.Mx {
//		for j, elem := range row {
//			// hash the current element in Mx using mc
//			mc.Write(elem)
//			h := mc.Sum()
//			// create a constraint for the current element in HMx
//			HMx[i][j] = h
//		}
//	}
//
//	for i, row := range HMx {
//		for j, elem := range row {
//			api.AssertIsEqual(elem, circuit.Cloud_HMx[i][j])
//		}
//	}
//
//	//SHMx := make([][]frontend.Variable, len(circuit.Mx))
//	//for i := range HMx {
//	//	SHMx[i] = make([]frontend.Variable, len(circuit.Mx[i]))
//	//}
//	//for i, row := range HMx {
//	//	for j, elem := range row {
//	//		temp := cs.Add(elem, circuit.r)
//	//		mc.Write(temp)
//	//		SHMx[i][j] = mc.Sum()
//	//	}
//	//}
//	//for i, row := range SHMx {
//	//	for j, elem := range row {
//	//		cs.AssertIsEqual(elem, circuit.Cloud_SHMx[i][j])
//	//	}
//	//}
//
//	return nil
//}
//
//func PbcElementToVariables(in [][]*pbc.Element, cs frontend.API) [][]frontend.Variable {
//	out := make([][]frontend.Variable, len(in))
//	for i, row := range in {
//		out[i] = make([]frontend.Variable, len(row))
//		for j, elem := range row {
//			out[i][j] = cs.Constant(elem)
//		}
//	}
//	return out
//}
//
//func PbcToVariables(in *pbc.Element, cs frontend.API) frontend.Variable {
//	out := cs.Constant(in)
//	return out
//}
//
//func BigIntsToVariables(in [][]*big.Int, cs frontend.API) [][]frontend.Variable {
//	out := make([][]frontend.Variable, len(in))
//	for i, row := range in {
//		out[i] = make([]frontend.Variable, len(row))
//		for j, elem := range row {
//			out[i][j] = cs.Constant(elem)
//		}
//	}
//	return out
//}
